package top.carrotguo.weibo.utils;

import android.content.Context;
import android.widget.Toast;

public class ToastUtils {
    public static Toast toast;

    public static void shortToast(Context ctx, CharSequence message){
        if (toast == null) {
            toast = Toast.makeText(ctx,message,Toast.LENGTH_SHORT);
        } else {
            toast.setText(message);
            toast.setDuration(Toast.LENGTH_SHORT);
        }
        toast.show();
    }

}
